package lab02.test09;

public class Student {
    //属性：学号，班号，姓名，年龄
    String num;
    String classnum;
    String name;
    String sex;
    int age;
    //行为

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getClassnum() {
        return classnum;
    }

    public void setClassnum(String classnum) {
        this.classnum = classnum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        //把Student类的对象的所有属性信息组合成一个字符串输出显示
        return "\t"+name+"\t"+num+"\t"+age+"\t"+sex+"\t"+classnum;
    }
}
